package org.codingeasy.streamrecord.examples.expression;

import org.codingeasy.streamrecord.examples.pojo.User;
import org.codingeasy.streamrecord.examples.service.UserService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Import;

/**
*   
* @author : KangNing Hu
*/
@Import(Config.class)
@SpringBootApplication
public class MethodRouteExample {


  public static void main(String[] args) throws InterruptedException {
    ConfigurableApplicationContext configurableApplicationContext = SpringApplication
        .run(SimpleExpressionExample.class, args);
    UserService userService = configurableApplicationContext.getBean(UserService.class);
    User user = new User();
    user.setName("小玩");
    userService.route(user);
    Thread.currentThread().join();
    configurableApplicationContext.stop();
  }
}
